package Work;

import java.util.Objects;

public class Reader {
	private String r_id;//读者编号
	private String r_name;//读者姓名
	private String r_number;//电话
	private String institute;//学院
	private String r_amount;
	
	//全参构造
	public Reader(String id, String name, String number, String institute, String r_amount) {
		this.r_id = id;
		this.r_name = name;
		this.r_number = number;
		this.institute = institute;
		this.r_amount = r_amount;
	}
	
	public Reader() {
		// TODO 自动生成的构造函数存根
	}

	//比较判断方法
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Reader reader = (Reader) o;
        return r_name.equals(reader.r_name);//返回读者姓名
    }
    
    //toString
    @Override
    public String toString() {
        return "Reader{" +
                "r_id=" + r_id +
                ", r_name='" + r_name + '\'' +
                ", r_number='" + r_number + '\'' +
                ", institute=" + institute +  '\'' +
                ", r_amount='" + r_amount + '\'' +
                '}';
    }
    
    public String getID() {
    	return r_id;
    }
    
    public void setID(String id) {
    	this.r_id = id;
    }
    
    public String getName() {
    	return r_name;
    }
    
    public void setName(String name) {
        this.r_name = name;
    } 
    
    public String getNumber() {
    	return r_number;
    }
    
    public void setNumber(String number) {
    	this.r_number = number;
    }
    
    public String getInstitute() {
    	return institute;
    }
    
    public void setInstitute(String institute) {
    	this.institute = institute;
    }
    public String getAmount() {
    	return r_amount;
    }
    
    public void setAmount(String r_amount) {
    	this.r_amount = r_amount;
    }
}

